package flash.filesystem;

extern class File extends flash.net.FileReference
{
	static function createTempFile():flash.filesystem.File;
	static function createTempDirectory():flash.filesystem.File;
	static function getRootDirectories():Array<String>;
	static var documentsDirectory(default, null):flash.filesystem.File;
	static var desktopDirectory(default, null):flash.filesystem.File;
	static var applicationStorageDirectory(default, null):flash.filesystem.File;
	static var userDirectory(default, null):flash.filesystem.File;
	static var separator(default, null):String;
	static var lineEnding(default, null):String;
	static var systemCharset(default, null):String;
	static var applicationDirectory(default, null):flash.filesystem.File;
	function resolvePath(path:String):flash.filesystem.File;
	function getRelativePath(ref:flash.net.FileReference, useDotDot:Bool = false):String;
	function canonicalize():Void;
	function browseForOpen(title:String, typeFilter:Array<flash.net.FileFilter> = null):Void;
	function browseForOpenMultiple(title:String, typeFilter:Array<flash.net.FileFilter> = null):Void;
	function browseForSave(title:String):Void;
	function browseForDirectory(title:String):Void;
	function deleteFile():Void;
	function deleteFileAsync():Void;
	function deleteDirectory(deleteDirectoryContents:Bool = false):Void;
	function deleteDirectoryAsync(deleteDirectoryContents:Bool = false):Void;
	function copyTo(newLocation:flash.net.FileReference, overwrite:Bool = false):Void;
	function copyToAsync(newLocation:flash.net.FileReference, overwrite:Bool = false):Void;
	function moveTo(newLocation:flash.net.FileReference, overwrite:Bool = false):Void;
	function moveToAsync(newLocation:flash.net.FileReference, overwrite:Bool = false):Void;
	function moveToTrash():Void;
	function moveToTrashAsync():Void;
	function createDirectory():Void;
	function getDirectoryListing():Array<String>;
	function getDirectoryListingAsync():Void;
	function clone():flash.filesystem.File;
	function openWithDefaultApplication():Void;
	var url:String;
	var isDirectory(default, null):Bool;
	var icon(default, null):flash.desktop.Icon;
	var isPackage(default, null):Bool;
	var isSymbolicLink(default, null):Bool;
	var nativePath:String;
	var spaceAvailable(default, null):Float;
	var exists(default, null):Bool;
	var parent(default, null):flash.filesystem.File;
	var downloaded:Bool;
	var isHidden(default, null):Bool;
	function new(path:String = null):Void;
}